package com.ruoyi.tranShort.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tranShort.mapper.ShortWristbandDerviceMapper;
import com.ruoyi.tranShort.domain.ShortWristbandDervice;
import com.ruoyi.tranShort.service.IShortWristbandDerviceService;

/**
 * 手环管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-09
 */
@Service
public class ShortWristbandDerviceServiceImpl implements IShortWristbandDerviceService 
{
    @Autowired
    private ShortWristbandDerviceMapper shortWristbandDerviceMapper;

    /**
     * 查询手环管理
     * 
     * @param id 手环管理主键
     * @return 手环管理
     */
    @Override
    public ShortWristbandDervice selectShortWristbandDerviceById(Long id)
    {
        return shortWristbandDerviceMapper.selectShortWristbandDerviceById(id);
    }

    /**
     * 查询手环管理列表
     * 
     * @param shortWristbandDervice 手环管理
     * @return 手环管理
     */
    @Override
    public List<ShortWristbandDervice> selectShortWristbandDerviceList(ShortWristbandDervice shortWristbandDervice)
    {
        return shortWristbandDerviceMapper.selectShortWristbandDerviceList(shortWristbandDervice);
    }

    /**
     * 新增手环管理
     * 
     * @param shortWristbandDervice 手环管理
     * @return 结果
     */
    @Override
    public int insertShortWristbandDervice(ShortWristbandDervice shortWristbandDervice)
    {
        shortWristbandDervice.setCreateTime(DateUtils.getNowDate());
        return shortWristbandDerviceMapper.insertShortWristbandDervice(shortWristbandDervice);
    }

    /**
     * 修改手环管理
     * 
     * @param shortWristbandDervice 手环管理
     * @return 结果
     */
    @Override
    public int updateShortWristbandDervice(ShortWristbandDervice shortWristbandDervice)
    {
        return shortWristbandDerviceMapper.updateShortWristbandDervice(shortWristbandDervice);
    }

    /**
     * 批量删除手环管理
     * 
     * @param ids 需要删除的手环管理主键
     * @return 结果
     */
    @Override
    public int deleteShortWristbandDerviceByIds(Long[] ids)
    {
        return shortWristbandDerviceMapper.deleteShortWristbandDerviceByIds(ids);
    }

    /**
     * 删除手环管理信息
     * 
     * @param id 手环管理主键
     * @return 结果
     */
    @Override
    public int deleteShortWristbandDerviceById(Long id)
    {
        return shortWristbandDerviceMapper.deleteShortWristbandDerviceById(id);
    }
}
